package com.cn.service.Impl;

import lombok.val;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cn.mapper.CollectMapper;
import com.cn.pojo.Collect;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cn.service.CollectService;
@Service
public class CollectServiceImpl extends ServiceImpl<CollectMapper, Collect> implements CollectService{

    @Autowired
    CollectMapper collectMapper;

    @Override
    public Page<Collect> collectList(Page page, String nickName) {
        List<Collect> collects = collectMapper.collectList(page, nickName);
        page.setRecords(collects);
        return page;
    }

    @Override
    public Integer deleteCollect(Long id) {
        return this.baseMapper.deleteById(id);
    }
}
